# 实际水样加标回收数据（论文表1）
water_samples = [
    ["矿泉水", [5, 10, 20], [4.81, 9.68, 19.58] ],#[96.2,96.8,97.9]
    ["自来水", [5, 10, 20], [4.69, 9.88, 21.02]], #[93.8, 98.8, 105.1]
    ["河水", [5, 10, 20], [5.26, 9.76, 20.32]]    #[105.2, 97.6, 101.6]
]
def calculate_recovery(spiked,found): #计算加标回收率（.1f）函数，参数：加标浓度，实测浓度
    return round(found/spiked*100,1)
for  name,spiked,found in water_samples:
    print(f"\n{name}的回收率为：")
    for s,f in zip(spiked,found):
        recovery = calculate_recovery(s,f)
        if 90<= recovery <=110:
            status = "合格"
        else:
            status = "不合格"
    print(f"加标{s}umol/l-实测{f}umol/l-回收率{recovery}%-{status}")



